import React,{Component} from "react"
import "./index.css"
import RightContainer from "../../../components/RightContainer"
import { Table,Space} from 'antd';
import { Switch } from 'antd';
class list extends Component{
    state={
        columns:[
            {
              title: 'ID',
              dataIndex: 'age',
              key: 'age',
            },
            {
              title: '门店名称',
              dataIndex: 'name',
              key: 'name',
              render: text => <a>{text}</a>,
            },
            
            {
              title: '门店店长',
              dataIndex: 'address',
              key: 'address',
            },
            {
                title: '在售商品',
                dataIndex: 'addy',
                key: 'addy',
            },
            {
                title: '销售额',
                dataIndex: 'addif',
                key: 'addif',
            },
            {
                title: '是否支持自提',
                dataIndex: 'phone',
                key: 'phone',
            },
            {
              title: '类型',
              dataIndex: 'position',
              key: 'position',
          },
            {
              title: '状态',
              key: 'tags',
              render: (text, record) => (
                    <Switch defaultChecked onChange={this.onChange} />
              ),
            },
            {
              title: '操作',
              key: 'action',
              render: (text, record) => (
                <Space size="middle">
                  <a>编辑</a>
                  <a onClick={()=>this.eee(record.id)}>删除</a>
                </Space>
              ),
            },
          ],
          data:[
            {
              key: '1',
              name: 'John',
              age: 32,
              address: 'New',
              tags: 'developer',
              addy:"sfsdff",
              addif:"收款机房不好",
              phone:"jgjggvh",
              position:"就黄果树"
            }
          ]
        
    }
    eee(id){
     
    }
    render(){
      function onChange(checked) {
        console.log(`switch to ${checked}`);
      }
        const {data,columns}=this.state
        return <RightContainer>
               <button className="q1">新增</button>
               <div>
            <Table columns={columns} dataSource={data} />
            </div>
        </RightContainer>
    }
}
export default list